package kfm.model;
public class Goods {
    private int goodNo;
    private String goodsName;
    private double cost;
    private double price;
    private int count;
    private CateGory cateGory;

    public Goods() {
    }

    public Goods(int no) {
        this.goodNo = no;
    }

    public Goods(int no, String name, double cost, double price, int count, CateGory cateGory) {
        this.goodNo = no;
        this.goodsName = name;
        this.cost = cost;
        this.price = price;
        this.count = count;
        this.cateGory = cateGory;
    }


    public String toString() {
        return "商品序号：" + goodNo + "\t" +
                "名称：" + goodsName + "\t" +
                "成本：" + cost + "\t" +
                "售价：" + price + "\t" +
                "库存：" + count + "\t" + "\t" +
                "商品分类：" + (cateGory == null ? "暂无商品分类" : cateGory.getNo());


    }
    public String toShow() {
        return "【商品列表】" +
                "商品序号" + goodNo + "\t" +
                "名称" + goodsName + "\t" +
                "售价" + price + "\t" +
                "库存" + count + "\t" ;


    }


    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public double getCost() {
        return cost;
    }

    public void setCost(double cost) {
        this.cost = cost;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public CateGory getCateGory() {
        return cateGory;
    }

    public void setCateGory(CateGory cateGory) {
        this.cateGory = cateGory;
    }

    public int getGoodNo() {
        return goodNo;
    }

    public void setGoodNo(int goodNo) {
        this.goodNo = goodNo;
    }
}
